package com.julius.design.pattern.adapter;

/**
 * <p>
 *
 * </p>
 */
public class Mp3Player implements MediaPlayer{

    private MediaAdapter mediaAdapter;


    @Override
    public void play(String name) {
        if ("mp3".equalsIgnoreCase(name)) {
            System.out.println("正在播放MP3");
        }else {
            mediaAdapter = new MediaAdapter(name);
            mediaAdapter.play(name);
        }

    }
}
